Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/prefs/src/commonMain/kotlin/org/meshtastic/core/prefs/FlowCache.kt 3c7e1266f819f90df2bfca6717cd1df0414d6c3a (3c7e1266) Text, 1.40 KB

T8b949e/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.prefs

Tff7b72import T7ee787kotlinx.atomicfu.AtomicRef
Tff7b72import T7ee787kotlinx.collections.immutable.PersistentMap

Tff7b72internal Tff7b72inline Tff7b72fun Tff7b72<Te6edf3KTb4b4b4, Te6edf3VTff7b72> Td2a8ffcachedFlowTb4b4b4(Te6edf3cacheTb4b4b4: Te6edf3AtomicRefTff7b72<Te6edf3PersistentMapTff7b72<Te6edf3KTb4b4b4, Te6edf3VTff7b72>Tff7b72>Tb4b4b4, Te6edf3keyTb4b4b4: Te6edf3KTb4b4b4, Te6edf3buildTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Te6edf3VTb4b4b4)Tb4b4b4: Te6edf3V Tb4b4b4{
Tff7b72var Te6edf3resolved Tff7b72= Te6edf3cacheTb4b4b4.Te6edf3valueTff7b72[Te6edf3keyTff7b72]
Tff7b72if Tb4b4b4(Te6edf3resolved Tff7b72=Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3newValue Tff7b72= Te6edf3buildTb4b4b4(Tb4b4b4)
Tff7b72while Tb4b4b4(Te6edf3resolved Tff7b72=Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3current Tff7b72= Te6edf3cacheTb4b4b4.Te6edf3value
Tff7b72val Te6edf3currentValue Tff7b72= Te6edf3currentTff7b72[Te6edf3keyTff7b72]
Tff7b72if Tb4b4b4(Te6edf3currentValue Tff7b72!Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4{
Te6edf3resolved Tff7b72= Te6edf3currentValue
Tb4b4b4} Tff7b72else Tff7b72if Tb4b4b4(Te6edf3cacheTb4b4b4.Te6edf3compareAndSetTb4b4b4(Te6edf3currentTb4b4b4, Te6edf3currentTb4b4b4.Te6edf3putTb4b4b4(Te6edf3keyTb4b4b4, Te6edf3newValueTb4b4b4)Tb4b4b4)Tb4b4b4) Tb4b4b4{
Te6edf3resolved Tff7b72= Te6edf3newValue
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tff7b72return Te6edf3checkNotNullTb4b4b4(Te6edf3resolvedTb4b4b4)
Tb4b4b4}

Served by rngit 1.5.4 - Generated in 0.26s